home *** CD-ROM | disk | FTP | other *** search
- Path: in2.uu.net!interaccess!usenet
- From: brianmcg@interaccess.com (Brian V. McGroarty)
- Newsgroups: comp.lang.c++
- Subject: Re: HELP: argc & argv to globals
- Date: 19 Mar 1996 02:36:21 GMT
- Organization: Internet Squire
- Message-ID: <4il6j5$mnb@nntp.interaccess.com>
- References: <314de637.14063528@news.alpha.net>
- Reply-To: brianmcg@interaccess.com
- NNTP-Posting-Host: d48-isdn.nhe.interaccess.com
- X-Newsreader: Internet Squire 1.20
-
- You need to declar a char ** to hold the value. Try something like:
-
- int gargc;
- char **gargv;
-
- int main( int argc, char *argv[] )
- {
- gargc= argc;
- gargv= argv;
- /* your code here */
- }
-
-
- Gabriel Millerd wrote:
- >Can someone email me a snibit of converting argv[] to a global
- >variable? I have been trying and trying.
- >
- >All I want to do is have argv[] accessable by functions outside of
- >main()
-
-
- ---
- Brian Valters McGroarty -- brianmcg@bix.com
- phone/fax (847) 439-7714
-